import { Injectable } from '@angular/core';
import { SERVERS_NAME } from '../../../config/config';
import { HttpService } from '../../../core/http.service';
import { CommHttpService } from '../../../core/comm.http.service';
import { Observable} from 'rxjs';

@Injectable()
export class LessonManageService  extends CommHttpService {
// base Url
  protected preUrl = `${SERVERS_NAME.SECURITY_SERVER}sys/section/`;
  // 设置校验接口地址
  protected baseUrl  = `${SERVERS_NAME.SUBSCRIPTION_SERVER}subscribe/`;
  constructor(protected http: HttpService) {
    super(http);
  }

  /**
   * 课节管理分页
   * @ param page
   */
  getSectionPage(page: any): Observable<any> {
    return this.http.post(page, this.preUrl + `list`);
  }

  /**
   * 设置时间
   * @ param param
   */
  setTime(param: any): Observable<any> {
    return  this.http.post(param, this.preUrl + `update`);
  }

  /**
   * 时间设置校验
   * @ param param
   */
  timeSetVerify(param: string): Observable<any> {
    return this.http.get({}, this.baseUrl + `record/normal/verify/` + param);
  }
}
